import request from "@/utils/request";

export function getFileList(){
    return request({
        url: '/api/file/list',
        method: 'get',
    })
}
export function removeFile(fileName){
    return request({
        url: `/api/file/delete/${fileName}`,
        method: 'post',
    })
}

//获取物资列表
export function getGoods(){
    return request({
        url: `/api/goods/list`,
        method: 'get',
    })
}

//获取字典数据
export function getDict(str){
    return request({
        url: `/api/dict/getDictValue?str=${str}`,
        method: 'get',
    })
}

//删除物资
export function removeGoodsApi(material){
    return request({
        url: '/api/goods/remove',
        method: 'post',
        data: material
    })
}

//增加物资
export function addGoods(material){
    return request({
        url: '/api/goods/add',
        method: 'post',
        data: material
    })
}